import website from '@/config/website';
export const roleOption={
  align:'center',
  height:document.documentElement.clientHeight -254,//有search
  tip: false,
  simplePage: true,
  searchShow: true,
  searchMenuSpan: 6,
  tree: true,
  border: true,
  selection: true,
  dialogMenuPosition:'center',
  dialogCustomClass:'fixedtable',
  dialogWidth:500,
  menuWidth:150,
  delBtn:false,
  editBtn:false,
  viewBtn:false,
  addBtn:false,
  columnBtn:false,
  column: [
    {
      label: "角色名称",
      prop: "roleName",
      search: true,
      span: 24,
      rules: [
        {
          required: true,
          message: "请输入角色名称",
          trigger: "blur"
        }
      ]
    },
    {
      label: "所属租户",
      prop: "tenantId",
      type: "tree",
      dicUrl: "/api/uic-system/tenant/select",
      addDisplay: false,
      editDisplay: false,
      viewDisplay: website.tenantMode,
      span: 24,
      props: {
        label: "tenantName",
        value: "tenantId"
      },
      hide: !website.tenantMode,
      search: website.tenantMode,
      rules: [{
        required: true,
        message: "请输入所属租户",
        trigger: "click"
      }]
    },
    {
      label: "角色别名",
      prop: "roleAlias",
      search: true,
      span: 24,
      rules: [
        {
          required: true,
          message: "请输入角色别名",
          trigger: "blur"
        }
      ]
    },
    {
      label: "上级角色",
      prop: "parentId",
      dicUrl:'/api/uic-system/role/tree-by-id',
      type: "tree",
      hide: true,
      span: 24,
      props: {
        label: "title"
      },
      rules: [
        {
          required: false,
          message: "请选择上级角色",
          trigger: "click"
        }
      ]
    },
    {
      label: "角色排序",
      prop: "sort",
      type: "number",
      span: 24,
      rules: [
        {
          required: true,
          message: "请输入角色排序",
          trigger: "blur"
        }
      ]
    }
  ]
}
